<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../src/lala-ui.css">
    <title>ActionSheet弹窗</title>
</head>
<body>
    <div class="tt-content">
        <div class="tt-panel-title">ActionSheet弹窗</div>
        <div class="tt-panel-body">
            <a class="tt-btn" id="js-show">显示弹出式菜单</a>
        </div>
    </div>
    <div class="tt-action-sheet">
        <div class="tt-mask"></div>
        <div class="tt-action-sheet-wrap">
            <div class="tt-action-sheet-header">
                <div class="tt-action-sheet-title">
                    您需要做啥子???
                </div>
            </div>
            <div class="tt-action-sheet-body">
                <a class="tt-action-sheet-menu">收藏</a>
                <a class="tt-action-sheet-menu">关注</a>
                <a class="tt-action-sheet-menu">分享</a>
            </div>
            <div class="tt-action-sheet-footer">
                <a class="tt-action-sheet-menu" id="js-close">取消</a>
            </div>
        </div>
    </div>

    <script>
        window.onload = () => {
            // 弹出菜单
            document.querySelector("#js-show").onclick = (e) => {
                document.querySelector(".tt-action-sheet").classList.add('show')
            }
            // 收回弹窗
            document.querySelector("#js-close").onclick = (e) => {
                document.querySelector(".tt-action-sheet").classList.remove('show')
            }
        }
    </script>
</body>
</html>